<tagLib name="html" />
<include file="../Public/header" />
<div id="wrap"> <include file="../Public/top" />
  <div id="content">
    <div class="mainarea">
      <div class="maininner">
        <div class="bdrcontent">
          <form id="phpform" method="post" action="__URL__/update" onsubmit="return $.formValidator.pageIsValid('1')">
          <input type="hidden" name="id" value="{$vo.id}" />
          <input type="hidden" name="nid" value="{$vo.nid}" />
            <table width="100%" cellpadding="0" cellspacing="0" class="formtable">
              <tr>
                <td width="100">页面标题：<input type="hidden" value="{$vo.id}" id="id" name="id" /></td>
                <td><input name="title" type="text" size="40" id="title" value="{$vo.title}" /></td>
              </tr>
              <tr>
                <td>请选择分类：</td>
                <td><select name="categoryID" id="categoryID">
                    <option value="0">无上级分类</option>
                    <volist name="category" id="category">
                      <option value="{$category.id}">{$category.name}</option>
                    </volist>
                  </select></td>
              </tr>
              <tr>
                <td>页面内容：</td>
                <td><html:editor type="fckeditor"  id="editor" width="550px" height="245px" name="content" content="{$vo.content}"  />                  </td>
              </tr>
              <tr>
                <td>上传:</td>
                <td><iframe frameborder="0" width="100%" height="120px;" src="__APP__/Sysattach/upload/edit/editor" scrolling="No"></iframe></td>
              </tr>
              <tr>
                <td></td>
                <td><input type="submit" value="提交" class="button" /></td>
              </tr>
            </table>
          </form>
        </div>
        <br />
      </div>
    </div>
    <include file="../Public/menu" /> </div>
  <include file="../Public/footer" /> </div>
</body></html>

<script type="text/javascript">
	$('#categoryID option[@value="{$vo.categoryID}"]').attr('selected','selected');
	
	$(document).ready(function(){
		$.formValidator.initConfig({autotip:true,onerror:function(msg){alert(msg)}});
		$("#title").formValidator({onshow:"请输入页面标题",onfocus:"页面标题长度最少为2个字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:4,max:50,onerror:"你输入的页面标题长度不正确,请确认"});
		$("#categoryID").formValidator({onshow:"请选择分类",onfocus:"只有这两个选项了,选一个吧",oncorrect:"恭喜你,选择完毕"}).inputValidator({min:1,onerror:"你还没有选择分类,请选择"});
	});
</script>
